home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / icons+tools / iconian / sources / emodules / mod / filenames.e < prev    next >
Text File  |  1995-12-22  |  736b  |  35 lines

  1. OPT MODULE
  2.  
  3. EXPORT PROC splitname(str1,str2,str3)
  4.   DEF filestart,pathlen,stt[5]:STRING
  5.     filestart:=FilePart(str1)
  6.     pathlen:=filestart-str1
  7.     IF pathlen
  8.         StrCopy(str2,str1,pathlen)
  9.         MidStr(stt,str2,StrLen(str2)-1,1)
  10.         IF StrCmp(stt,'/',ALL)
  11.             MidStr(str2,str2,0,StrLen(str2)-1)
  12.         ENDIF        
  13.         StrCopy(str3,filestart,ALL)
  14.     ELSE
  15.         StrCopy(str2,'',ALL)
  16.         StrCopy(str3,str1,ALL)
  17.     ENDIF
  18. ENDPROC
  19.  
  20. EXPORT PROC eaddpart(estring,string,maxbuf)
  21.     AddPart(estring,string,maxbuf)
  22.     SetStr(estring,StrLen(estring))
  23. ENDPROC
  24.  
  25. EXPORT PROC stripinfo(name)
  26.     DEF comp1[6]:STRING,comp2[6]:STRING
  27.     StrCopy(comp1,'.INFO',ALL)
  28.     MidStr(comp2,name,StrLen(name)-5,5)
  29.     UpperStr(comp2)
  30.     IF StrCmp(comp1,comp2,5)
  31.         MidStr(name,name,0,(StrLen(name)-5))
  32.     ENDIF
  33. ENDPROC
  34.  
  35.